package router

import (
	"liu_yu/handler/service"

	"github.com/gin-gonic/gin"
)

func Router() *gin.Engine {
	r := gin.Default()
	r.POST("/api/sms", service.Sms)              //短信发送
	r.POST("/api/login", service.Login)          //用户登录
	r.POST("/api/register", service.Register)    //用户注册
	r.POST("/api/friend", service.AddFriend)     //好友申请
	r.GET("/api/chat", service.Chat)             //聊天
	r.POST("/api/moments")                       //朋友圈
	r.GET("/usernameList", service.UsernameList) //模糊查询
	r.GET("/friendList", service.FriendList)     //好友查询
	r.POST("/addblack", service.AddBlack)        //黑名单
	return r
}
